package com.maimao.order.client;

import com.maimao.core.constant.ServiceContainer;
import com.maimao.core.interceptor.FeignInterceptor;
import com.maimao.core.model.resp.Result;
import com.maimao.model.kill.dto.KillDto;
import com.maimao.order.client.factory.GoodsFallBackFactory;
import com.maimao.order.client.factory.KillFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @author MaoLin Wang
 * @date 2021/1/15 2:16 下午
 */
@RequestMapping("/kill/doKill")
@FeignClient(value = ServiceContainer.KILL_SERVICE, fallbackFactory = KillFallBackFactory.class, configuration = FeignInterceptor.class)
public interface KillClient {

    @PostMapping("/client/$killFailMaiMao$")
    Result killFail(@RequestBody KillDto dto);

    @PostMapping("/client/reduceStock")
    Result reduceStock(@RequestBody KillDto dto);

}
